<div class="mainbox">
    <div class="sitem">
        <div class="stitle">添加规则</div>
        <div class="titem">
            <L:input placeholder="订单金额" bind-input="{{'$Cache.new_guide_config.max_price'}}" value="{{$Cache.new_guide_config.max_price}}"></L:input>
            <L:input placeholder="返比(0.01~0.99)" bind-input="{{'$Cache.new_guide_config.rate'}}" value="{{$Cache.new_guide_config.rate}}" event-enter="{{'$Top.$Event.recommend_config.add'}}"></L:input>
        </div>
        <sbutton shadownum1="0 0 10px 0" shadownum2="0 0 5px 0" event-click="{{'$Top.$Event.recommend_config.add'}}" class="btn" name="do" text="添加"></sbutton>
    </div>

    <div class="sitem">
        <div class="stitle">返利规则</div>
        {{#if $Cache.bus.guide_config.length}} {{#each $Cache.bus.guide_config}}
        <div class="pitem">
            <div class="item">
                <div class="i">订单金额:￥{{max_price}}
                </div>
                <div class="i">返比:{{rate}}</div>
            </div>
            <div class="item">
                <!-- <div class="i">购买者享受折扣:￥{{rate}}
                </div>
                <div class="i"> -->
                <sbutton event-click="{{'$Top.$Event.guide_config.remove'}}" class="btn" name="do" text="删除"></sbutton>
                <!-- </div> -->
            </div>
        </div>
        {{/each}} {{#else}}
        <p>还没定制返利规则</p>
        {{/if}}
    </div>

    <div class="sitem">
        <div class="stitle">添加员工</div>
        <div class="titem">
            <L:input placeholder="电话号码" bind-input="{{'$Cache.new_guide.phone_number'}}" value="{{$Cache.new_guide.phone_number}}"></L:input>
        </div>
        <sbutton event-click="{{'$Event.bus.add_guide'}}" class="btn" name="do" text="添加"></sbutton>
    </div>

    <div class="pointitem">
        <div class="ptitle">推荐者信息</div>
        {{#if $Cache.bus.guide_list.length}} {{#each $Cache.bus.guide_list}}
        <div class="pitem">
            <div class="item">
                手机:{{user.info.mobile_phone||user.info.email}}
            </div>
            <div class="item">
                <div class="i">推广:￥{{#Fixed acc}}</div>
                <div class="i">红利:
                    <span class="price">￥{{#Fixed _money}}</span>
                </div>
            </div>
            <div class="item">
                <div class="pastetitle">链接地址</div>
                <div class="paste">
                    {{$Top.bus_loginer.url+'?gi='+_id}}
                </div>
            </div>
            <div class="item">
                {{#if state==$Top.config.guide_status.weishenqingduihuan}}
                <div class="info">用户并未申请兑换</div>
                {{/if}} {{#if state==$Top.config.guide_status.shenqingduihuanzhong}}
                <div class="info">用户请求兑换，请将金额转到用户账上</div>
                <sbutton shadownum1="0 0 10px 0" shadownum2="0 0 5px 0" event-click="{{'$Top.$Event.bus.guide.shenqingduihuanzhong_to_shangjiayijingfukuan'}}" text="转账完成" class="btn"></sbutton>
                <!-- 现在默认是直接全部兑换TODO：兑换上限 -->
                {{/if}} {{#if state==$Top.config.guide_status.shangjiayijingfukuan}}
                <div class="info">等待用户确认收款</div>
                {{/if}}
                <sbutton shadownum1="0 0 10px 0" shadownum2="0 0 5px 0" event-click="{{'$Top.$Event.bus.remove_guide'}}" class="btn" name="do" text="移除"></sbutton>
            </div>
        </div>
        {{/each}} {{#else}}
        <p>还没有买家推荐过商品</p>{{/if}}
    </div>
</div>
